Test that disabled client well-known lookups make no network request - #34923
Draft
langleyd wants to merge 1 commit into
Draft
Test that disabled client well-known lookups make no network request#34923langleyd wants to merge 1 commit into
langleyd wants to merge 1 commit into
Conversation
The existing MatrixClientPeg tests only check the option handed to the SDK (`clientWellKnownPollPeriod` unset when `enable_client_well_known_lookups` is false), so they stayed green when matrix-js-sdk stopped honouring that option (matrix-org/matrix-js-sdk#5470, shipped in js-sdk 42.2.0 / Element Web 1.12.26). Start a real MatrixClient against the fetch mock instead and assert on the requests actually made: the well-known is requested by default and never requested when the config disables the lookups. The second case fails against matrix-js-sdk develop until the SDK fix lands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #34921
Depends on matrix-org/matrix-js-sdk#5521
The existing MatrixClientPeg tests only check the option handed to the SDK (
clientWellKnownPollPeriodunset whenenable_client_well_known_lookupsis false), so they stayed green when matrix-js-sdk stopped honouring that option (matrix-org/matrix-js-sdk#5470, shipped in js-sdk 42.2.0 / Element Web 1.12.26).Now it starts a real MatrixClient against the fetch mock instead and assert on the requests actually made: the well-known is requested by default and never requested when the config disables the lookups.
The second case fails against matrix-js-sdk develop until matrix-org/matrix-js-sdk#5521 lands.